package com.redepronik.medisys.cithis.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the emailpacientes database table.
 * 
 */
@Entity
@Table(name="emailpacientes")
@NamedQuery(name="Emailpaciente.findAll", query="SELECT e FROM Emailpaciente e")
public class EmailPaciente implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="EMAILPACIENTES_EMAILPACIENTEID_GENERATOR" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EMAILPACIENTES_EMAILPACIENTEID_GENERATOR")
	@Column(unique=true, nullable=false)
	private Integer emailpacienteid;

	@Column(nullable=false, length=100)
	private String email;

	//bi-directional many-to-one association to Paciente
	@ManyToOne
	@JoinColumn(name="pacienteid", nullable=false)
	private Paciente paciente;

	public EmailPaciente() {
	}

	public Integer getEmailpacienteid() {
		return this.emailpacienteid;
	}

	public void setEmailpacienteid(Integer emailpacienteid) {
		this.emailpacienteid = emailpacienteid;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Paciente getPaciente() {
		return this.paciente;
	}

	public void setPaciente(Paciente paciente) {
		this.paciente = paciente;
	}

}